updating oE valid
valid
include eumem.e namespace eumem export function valid(object mem_p, object mem_struct_p = 1)
validates a block of (pseudo) memory.
Parameters:
- mem_p : The handle to a previously acquired ram_space location.
- mem_struct_p : If an integer, this is the length of the sequence that should be occupying the ram_space location pointed to by mem_p.
Returns:
An integer,
0 if either the mem_p is invalid or if the sequence at that location is the wrong length.
1 if the handle and contents are okay.
Comments:
This can only check the length of the contents at the location. Nothing else is checked at that location.
Example 1:
my_spot = malloc() ram_space[my_spot] = my_data . . . do some processing . . if valid(my_spot, length(my_data)) then free(my_spot) end if
Not Categorized, Please Help
|